<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>web site</title>
	</head>
	<body>
		<script type="text/javascript">
			var aaa;
			console.log(aaa);
			aaa = 111;
			fn();
			
			function fn(bbb){
				//变量声明提升在函数内部照样实用。
				//函数的就近原则。
				var aaa;
				console.log(aaa);
				aaa = 222;
			}
			function fn2(bbb){
				console.log(bbb);
			}
		</script>	
	</body>
</html>